<%--
  Created by IntelliJ IDEA.
  User: zgl
  Date: 2022/4/10
  Time: 18:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title>学生查询</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        table{
            border: 1px solid black;

            background-color: #FAEBD7;
            border-spacing: 0px;

        }
        th {
            background-color: #7074c6;
            font-size: 26px;
        }
        tr th{
            border: 1px solid black;
        }
        td {
            font-size: 22px;
        }
        .mybutton{
            text-align: center;
            font-size: 22px;
        }
    </style>
</head>
<body>
    <table>
        <tr>
            <th>姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>分数</th>
            <th>操作</th>
        </tr>
        <c:if test="${not empty students}">
            <c:forEach items="${students}" var="stu">
                <tr>
                    <td>${stu.name}</td>
                    <td>${stu.age}</td>
                    <td>${stu.sex}</td>
                    <td>${stu.score}</td>
                    <c:if test="${fn:contains(user_login.powers,'3') }">
                        <td><button class="mybutton" onclick="javascript:location.href='deletestu?dname=${stu.name}'">删除</button></td>
                    </c:if>
                </tr>
            </c:forEach>
        </c:if>
    </table>
</body>
</html>
